import { defineStore } from 'pinia';

export interface Monitor {
  id: string;
  name: string;
  type: string;
  target: string;
  status: 'active' | 'inactive';
}

export const useMonitorStore = defineStore('monitor', {
  state: () => ({
    monitors: [] as Monitor[],
  }),
  
  actions: {
    async fetchMonitors(): Promise<Monitor[]> {
      // TODO: 实现从后端获取监控列表的逻辑
      return [];
    },
    
    async createMonitor(monitor: Omit<Monitor, 'id'>): Promise<Monitor> {
      // TODO: 实现创建监控的逻辑
      return { ...monitor, id: Date.now().toString() };
    },
    
    async updateMonitor(monitor: Monitor): Promise<Monitor> {
      // TODO: 实现更新监控的逻辑
      return monitor;
    },
    
    async deleteMonitor(id: string): Promise<void> {
      // TODO: 实现删除监控的逻辑
    }
  }
}); 